<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--使用taglib引入标签--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
    <head>
        <title>订单列表</title>
        <link rel="stylesheet" type="text/css" href="../../css/list.css">
    </head>
    <body>
    <div>
        <table style="margin-left: 170px" bordercolor="black" border="1" cellspacing="0">
            <tr>
                <td>订单id</td>
                <td>商品名称</td>
                <td>买家</td>
                <td>下单时间</td>
                <td>是否支付</td>
                <td>地址</td>
                <td>操作</td>
            </tr>
            <c:forEach items="${requestScope.orderList}" var="order">
                <tr>

                    <td >${order.order_id}</td>
                    <td>${order.goods_name}</td>
                    <td>${order.user_name}</td>
                    <td>${order.order_time}</td>
                    <c:choose>
                        <c:when test="${order.pay_status==0}"><td>未支付</td></c:when>
                        <c:when test="${order.pay_status==1}"><td>已支付</td></c:when>
                        <c:otherwise><td>未知状态</td></c:otherwise>
                    </c:choose>
                    <td>${order.user_addr}</td>
                    <td>
                        <a class="oplink" href="/management?method=oupdate&order_id=${order.order_id}">修改</a>
                        <br>
                        <a class="oplink" href="/management?method=odelete&order_id=${order.order_id}">删除</a>
                    </td>
                </tr>
            </c:forEach>
        </table>
    </div>
    </body>
</html>
